<?php
	include('./init.php');
	if (empty($_GET['letter'])) {
		exit;
	}
	$letter = $_GET['letter'];
	$data = utils::gpc_check($_GET);
	$res = mysql_query("SELECT id_category FROM pages WHERE page_name='" . strtolower($data['letter']). "'");
	if ($res !== FALSE && mysql_num_rows($res)) {
	$lin = mysql_fetch_row($res);
	mysql_free_result($res);
	$id_category = $lin[0];
  } else {
    header('Location: ./');
    exit;
  }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>TV Theme Music - <?php echo strtoupper($letter);?> TV Shows - TelevisionTunes.com</title>

<meta name="description" content="TV Theme music and songs from 25,893 different television shows. Listen to them all in MP3 format." />

<meta name="keywords" content="TV Theme music, tv theme songs, television songs, tv tunes, themes, theme songs, tv shows, tv music, television tunes, televisiontunes, tvsongs, jayzoo, mp3 tv music, theme music"/>
<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />
<?php include('blocks/assets.php'); ?>
</head>
<body>
<?php include('blocks/google-analytics.php'); ?>
<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
		<?php include('blocks/menu.php'); ?> 		
	</div>
	<div id="content-wrap">
		<div id="main">
			<div class="theme-song-top">
				<?php //include('blocks/index.php'); ?>
			</div>
			<div class="theme-song-left-content">
				<h3 align="left" style="margin-left:30px;"><?php echo strtoupper($letter);?> Theme Songs</h3>
				<?php if ( strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') ) { ?>
				<div class="news-content-text" style="margin:5px 15px 0px 0px;">
				<?php } else { ?>
				<div class="news-content-text">
				<?php } ?>
				<div align="left">
					<table cellpadding="0" cellspacing="0" class="table-theme-song-left">
						<?php
					$res = mysql_query("SELECT file_name,file_title FROM bj_audio WHERE id_parent={$id_category} ORDER BY file_title");
						if ($res !== FALSE && mysql_num_rows($res)) {
					while ($lin = mysql_fetch_assoc($res)) {
						echo '<tr><td><a href="' . utils::create_href($lin['file_title']) .'">' . str_replace('.mp3', '', $lin['file_name']) . '</a></td></tr>';
						}
					mysql_free_result($res);
						}
						?>
					</table>
					</div>
				</div>
			</div>
			<div class="theme-song-right-content">
				<div class="link-right-content-ads">
				<?php include('blocks/ads_mediumRectangle.php');?>
				</div>
				<div class="theme-song-table-content-r">
					<table cellpadding="0" cellspacing="0" class="theme-song-table-content">
						<tr>
							<td colspan="4" align="left" class="tb-row1">Check out these sites for more great songs.</td>
						 </tr>
						<tr>
							<td class="tb-row2">
								<a href="http://gamethemesongs.com"><img src="images/gamethemesongs.jpg" alt="Video Game Songs" width="47" border="0" /></a>
							</td>
							<td class="tb-row2">
								<p><a href="http://gamethemesongs.com" style="color:#7d1e1f;" target="_blank">Game Theme Songs</a></p>
								<p><a href="http://gamethemesongs.com" style="color:#333;" target="_blank">For video game music and songs.</a></p>
							</td>
						</tr>
						<tr>
							<td class="tb-row2">
								<a href="http://tvadsongs.com"><img src="tinys/tv-adsongs.jpg" alt="" border="0" /></a>
							</td>
							<td class="tb-row2">
								<a href="http://tvadsongs.com" style="color:#7d1e1f;">TV Ad Songs</a>.<br> <a href="http://tvadsongs.com" style="color:#333;">For TV commercials with great songs.</a>
							</td>
						</tr>
						<tr>
							<td class="tb-row3"><a href="http://fcsongs.com"><img src="tinys/fc-songs.jpg" alt="Football Club Music" width="47" border="0" /></a></td>
							<td><a href="http://fcsongs.com" style="color:#7d1e1f;" >FC Songs</a>.<br> <a href="http://fcsongs.com" style="color:#333;">For football club songs from around the world.</a></td>
						</tr>
					</table>
				</div>
			</div>
			<div class="contact-ads-content">
				<?php include('blocks/index.php'); ?>
			</div>
		</div>
		<!-- content-wrap ends here -->
		
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
<script type="text/javascript" src="http://cdn.fluidads.co/scripts/fluid/televisiontunes/default" id="FA_pubJS" async defer></script></body>
</html>